package com.hr.pong.controller;

import com.hr.pong.service.PongService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("/pong")
public class PongController {

  private final PongService pongService;

  public PongController(PongService pongService) {
    this.pongService = pongService;
  }

  @GetMapping
  public Mono<String> pong() {
    // 获取服务ID

    return pongService.pong();
  }
}